// +---------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +---------------------------------------------------------------------
// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
// +---------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +---------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +---------------------------------------------------------------------

import LayoutMain from '@/layout';
import setting from '@/setting';
let routePre = setting.routePre;

const meta = {
  auth: true,
};

const pre = 'insurance_';

export default {
  path: routePre + '/insurance',
  name: 'insurance',
  header: 'insurance',
  redirect: {
    name: `${pre}index`,
  },
  meta,
  component: LayoutMain,
  children: [
    {
      path: 'type',
      name: `${pre}type`,
      meta: {
        auth: ['admin-insurance-type'],
        title: '保险类型',
      },
      component: () => import('@/pages/insurance/type/index'),
    },
    {
        path: 'list',
        name: `${pre}list`,
        meta: {
          auth: ['admin-insurance-insurance-index'],
          title: '保险列表',
        },
        component: () => import('@/pages/insurance/list/index'),
      },
      {
        path: 'list/add_insurance/:id?',
        name: `${pre}addInsurance`,
        meta: {
          auth: ['admin-insurance-addInsurance'],
          title: '添加保险',
          activeMenu: routePre + '/insurance/list',
        },
        component: () => import('@/pages/insurance/list/addInsurance'),
      },
  ],
};
